package com.sc.nft.entity.vo;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.math.BigDecimal;

@Data
@ApiModel("藏品购买确认页")
public class CollectionBuyConfirmVO {

    @ApiModelProperty("标题")
    private String title;

    @ApiModelProperty("当前价格")
    private String presentPrice;

    @ApiModelProperty("发行价格")
    private String publishPrice;

    @ApiModelProperty("挂单数,包含被锁的订单")
    private Integer presentOrder;

    @ApiModelProperty("可买数量")
    private Integer purchasable;

    @ApiModelProperty("钱包余额")
    private String balanceWallet;

    @ApiModelProperty("总计金额,该金额包含着被锁的订单")
    private String aggregate;

    public void setPresentPrice(BigDecimal presentPrice) {
        this.presentPrice = presentPrice.setScale(2,BigDecimal.ROUND_DOWN).toPlainString();
    }

    public void setPublishPrice(BigDecimal publishPrice) {
        this.publishPrice = publishPrice.setScale(2,BigDecimal.ROUND_DOWN).toPlainString();
    }

    public void setBalanceWallet(BigDecimal balanceWallet) {
        this.balanceWallet = balanceWallet.setScale(2,BigDecimal.ROUND_DOWN).toPlainString();
    }

    public void setAggregate(BigDecimal aggregate) {
        this.aggregate = aggregate.setScale(2,BigDecimal.ROUND_DOWN).toPlainString();
    }

}
